<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;
use \app\middleware\HelloFilter;

Route::get('think', function () {
    return 'hello,ThinkPHP6!6666';
});
/*

Route::get('hello/:name', 'index/hello');

//auth服务器回调
Route::get('connect', 'index/connect');

Route::rule('clear','Index/clear'); //清理缓存


Route::get('logout','Index/logout');
Route::rule('register','Index/register_html');
Route::post('register/do','Index/register_do');

Route::get('project/upload','Projects/upload');
Route::get('code/<code>','Index/code');//->middleware(HelloFilter::class);
Route::get('code','Index/code0');//->middleware(HelloFilter::class);;

Route::rule('api/check/download/<project_id>','Index/api_check_download');
Route::get('download/<id>','Index/download');

Route::get('share/create','Index/share_create_html');
Route::post('api/share/save','Index/api_project_save');
Route::post('api/project/update','Index/api_project_update');
Route::get('share/<id>','Index/share');

Route::post('upload/image','Index/upload');
Route::get('setloginuser/<id>','Index/setloginuser');

Route::get('tools','Index/tools_html');
Route::get('qqq','Index/qqq_html');
Route::get('buy','Index/buy_html');
Route::get('search','Index/search');

//用户
Route::rule('user/home','User/home');
Route::rule('user/email/ack','User/api_mail_ack'); //发送验证码到邮箱，用于绑定邮箱
Route::rule('user/email/active','User/api_mail_active'); //激活邮箱


Route::rule('api/project/info/<id>','Index/project_info'); //激活邮箱

*/

Route::rule('/','Index/index');
Route::rule('qq/login','AuthController/qq_login');
Route::rule('qq/callback','AuthController/qq_callback');
Route::rule('logout','Hello/logout');

Route::rule('lesson/video/url','LessonController/video_url');
Route::rule('lesson/<course_id>/<lesson_id>','CourseController/play');
Route::rule('study/<course_id>/<lesson_id>','CourseController/play');

Route::rule('course/explore/<category_code>','CourseController/explore');
Route::rule('course/explore','CourseController/explore');
Route::rule('learn/<lesson_id>','CourseController/learn');



Route::rule('course/<course_id>/lesson/<lesson_id>','CourseController/play');
Route::rule('course/<course_id>/task','CourseController/task');
Route::rule('course/<course_id>/buy','CourseController/buy');
Route::rule('course/<course_id>/info','CourseController/index');
Route::rule('course/<course_id>','CourseController/task');





Route::rule('payjs/test','Pay/test');
Route::rule('payjs/check','Pay/payjs_order_check');
Route::rule('payjs/notify','Pay/notify');


